<template>
  <div>
    <Common :baseUrl :rules>
      <template #content="{ formData }">
        <el-row>
          <el-col :span="12">
            <el-form-item
              label="均值图默认样本个数"
              prop="sampleNum"
              :show-message="false"
            >
              <el-input v-model="formData.sampleNum" style="width: 65px" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item
              label="均值分组测量值个数"
              prop="groupingNum"
              :show-message="false"
            >
              <el-input v-model="formData.groupingNum" style="width: 65px" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="当超过控制线上下限，是否预警">
              <el-switch
                v-model="formData.isWarn"
                inline-prompt
                active-value="1"
                inactive-value="0"
                active-text="是"
                inactive-text="否"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item
              label="预警触发：超过预警控制线比率"
              prop="controlRate"
              :show-message="false"
            >
              <el-input v-model="formData.controlRate" style="width: 65px">
                <template #suffix> % </template>
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </template>
    </Common>
  </div>
</template>
<script setup lang="ts">
import Common from "@/views/qms/pcm/pcmsystemconfig/components/common.vue";

defineOptions({
  name: "PCMPCMSPECIALRULECOMMONAVERAGE",
});

const baseUrl = "pcmconfigaverage";

const rules = {
  sampleNum: [
    {
      pattern: /^([0-9]{0,5})$/,
      message: "只能请输入五位正整数",
      trigger: ["blur", "change"],
    },
  ],
  groupingNum: [
    {
      pattern: /^([0-9]{0,5})$/,
      message: "只能请输入五位正整数",
      trigger: ["blur", "change"],
    },
  ],
  controlRate: [
    {
      pattern: /^([0-9]{0,5})$/,
      message: "只能请输入五位正整数",
      trigger: ["blur", "change"],
    },
  ],
};
</script>

<style scoped lang="scss"></style>
